const mysql = require('./../util/mysqlUtil.js');
 
var getUserById = async (userId) => {
  let mysqlOptions = {
    sql : 'select * from user where id = ?',
    args : [userId]
  };
 
  var users = await mysql.execQuery(mysqlOptions);
  if(users.length == 0) {
    return null;
  } else {
    return users;
  }
};
 
module.exports = {
  getUserById : getUserById
};